// component/index/card/card.js
const app = getApp();
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        "card1":{type:Array},
        "card2":{type:Array}
    },

    /**
     * 组件的初始数据
     */
    data: {},

    lifetimes: {
        attached() {


        }
    },

    /**
     * 组件的方法列表
     */
    methods: {



        makecard: function () {
            app.func.getPromise('/my/info')
                .then(([code, res]) => {
                    if (code == 200) {
                        if (res.data.customers.length > 0) {
                            this.template();
                        } else {
                            this.auth();
                        }
                    }
                })


        },

        auth: function () {
            wx.switchTab({
                url: '/pages/about/about'
            })
        },

        template: function () {
            wx.navigateTo({
                url: '/tools/pages/tool/card/make1/Template/Template'
            });
        },

        skulist: function () {
            wx.switchTab({
                url: '/pages/index/categorysku/categorysku'
            })
        }


    }
})
